Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 3 - Endpoints / Endpoints Reference
Constants and Data Types


The TDiscon Structure

You use the TDiscon structure to specify any user data sent with the disconnection and retrieved by the OTRcvDisconnect function (page 3-151). You pass this structure as a parameter to this function.

The TDiscon structure is defined by the TDiscon data type.

struct TDiscon
   {
      TNetbuf     udata;
      OTReason    reason;
      OTSequence  sequence;
   };
   typedef struct TDiscon TDiscon;
Field Description
udata
A TNetbuf structure that is filled in with data sent with the OTSndDisconnect function. You must allocate a buffer in which the data is placed when the function returns, and you must initialize the udata.maxlen field to indicate the maximum size of the data that can be sent with the disconnection request.
reason
A long specifying an error code that identifies the reason for the disconnection. These codes are supplied by the protocol. For additional information, consult the documentation provided for the protocol you are using.
sequence
A long specifying an outstanding connection request that has been rejected. This field is meaningful only when you have issued several connection requests to the same endpoint and are awaiting the results.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996